package cn.nn200433.job.config;

import lombok.Getter;
import lombok.Setter;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.context.properties.NestedConfigurationProperty;

/**
 * xxl-job 配置属性
 *
 * @author nn200433
 * @date 2024-03-01 01:52:12
 */
@Setter
@Getter
@ConfigurationProperties(prefix = XxlJobProperties.XXL_JOB_CONFIG_PREFIX)
public class XxlJobProperties {

    public static final String XXL_JOB_CONFIG_PREFIX = "xxl.job";

    /** 是否启用 */
    private Boolean            enable             = Boolean.TRUE;
    /** 是否同步修改远程（将会覆盖远程的更新） */
    private Boolean            isSyncModifyRemote = Boolean.TRUE;
    /** 执行器通讯TOKEN [选填]：非空时启用； */
    private String             accessToken;
    /** 调度中心配置 */
    @NestedConfigurationProperty
    private AdminProperties    admin;
    /** 执行器配置 */
    @NestedConfigurationProperty
    private ExecutorProperties executor;

}
